package com.atguigu.rulepo;
import org.jeasy.rules.api.Action;
import org.jeasy.rules.api.Facts;
// 通过接口方式标记为条件运行之后的操作
public class TenPercentDiscountAction implements Action {
    @Override
    public void execute(Facts facts) throws Exception {
        Integer price = facts.get("price");
        System.out.println("折扣规则为9折原价为:"+price+"折扣后的价格为：" + (float)(price * 0.9));
    }
}
